<!-- 问题详情 -->
<template>
	<view class="noticDetails">
		<view class="noticeTitle">{{ messageInfo.title }}</view>
		<view class="usernameAndTime">
			<view class="dateTime">{{ '发布时间: ' + messageInfo.show_time }}</view>
		</view>
		<scroll-view
			style="width: 100%;margin-top: 15rpx;"
			scroll-y="true"
		>
			<view class="noticeInfo"><u-parse :content="messageInfo.content"></u-parse></view>
		</scroll-view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				help_id:'',
				token:'',
				member_id:'',
				company_id:'',
				messageInfo: {}
			}
		},
		onLoad(val) {
			this.token = uni.getStorageSync('btlh_process_token') || '';
			this.member_id = uni.getStorageSync('btlh_process_member_id') || '';
			this.company_id = uni.getStorageSync('bthl_process_LoginCompanyId') || '';
			this.help_id = val.help_id;
			
			
		},
		onShow() {
			this.getDetails();
		},
		methods: {
			// 获取问题详情
			async getDetails(){
				const {
					data: res
				} = await this.$myRequest({
					url: 'Help/detail',
					method: 'POST',
					data: {
						member_id: this.member_id,
						token: this.token,
						help_id:this.help_id
					}
				});
				console.log(res)
				this.messageInfo = res.datas.info;
				this.messageInfo.content = this.messageInfo.content.replace(/\<img/g,'<img style="width:100%;height:auto;display:block"');
			},
		}
	}
</script>

<style lang="scss">
.noticDetails {
	background-color: #fff;
	padding: 40rpx 30rpx;
	width: 750rpx;
	height: auto;
	border-radius: 20rpx;
	box-sizing: border-box;
	position: relative;

	.noticeTitle {
		text-align: center;
		font-size: 30rpx;
		font-family: PingFang SC;
		font-weight: 500;
		color: #333333;
	}

	.usernameAndTime {
		margin-top: 20rpx;
		display: flex;
		justify-content: space-between;
		font-size: 22rpx;
		color: #666;

		.username {
			color: #128bf1;
		}
	}

	/deep/.noticeInfo {
		margin-top: 30rpx;
		font-size: 24rpx;
		// width: 285rpx;

		color: #666;
	}

	.closeIcon {
		position: absolute;
		top: -70rpx;
		right: 0;
	}
}
</style>
